package com.zw.cloud.mybatis.plus.schedule;

import lombok.extern.slf4j.Slf4j;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ShedlockTask {

    //@Scheduled(cron = "0/10 * * * * ? ")
    @SchedulerLock(name = "task1",lockAtMostFor = "1h", lockAtLeastFor = "5s")
    public void task() {
        log.info("[ShedlockTask][task]start...");
    }
}
